Skip to content

fix(strix): 교차 저장소 토큰과 실행 권한 정규화 - #574

Merged
seonghobae merged 4 commits into
mainfrom
fix/strix-cross-repo-dispatch-token
Jul 16, 2026
Merged

fix(strix): 교차 저장소 토큰과 실행 권한 정규화#574
seonghobae merged 4 commits into
mainfrom
fix/strix-cross-repo-dispatch-token

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

실증 원인

codec-carver#250의 기본 브랜치 repository_dispatch 실행 29517123708에서 두 번째 중앙 결함이 드러났습니다. dispatch는 중앙 .github에서 실행되므로 github.token이 대상 PR을 읽지 못해 STRIX_TARGET_PATH=__PR_SCOPE__ requires PR scoping으로 종료했습니다.

또한 #570의 umask 022는 한 실행에서는 통과했지만, 후속 PR 실행 29517654720에서 pip가 기존 콘솔 스크립트 모드를 보존해 동일한 group-writable 오류가 재발했습니다. 따라서 생성 기본값뿐 아니라 해시 전 실제 산출물의 권한도 정규화해야 합니다.

수정

  • 교차 저장소 dispatch의 PR 스코프 조회에는 이미 실시간 PR 검증과 fetch에 성공한 target-app 토큰을 재사용합니다.
  • 일반 pull_request_target은 기존 대상 저장소 github.token 동작을 유지합니다.
  • umask 022 뒤에도 chmod go-w -- "$strix_executable"를 적용하고, 그 다음 SHA-256을 계산합니다.
  • 런타임의 소유자·경로·권한·digest fail-closed 검사는 그대로 유지합니다.
  • 토큰 선택과 권한 정규화 순서를 Python/셸 회귀 단언으로 고정합니다.

로컬 검증

  • python3 -m pytest tests/test_required_workflow_queue_contract.py -q: 47 passed
  • actionlint .github/workflows/strix.yml: pass
  • bash -n scripts/ci/test_strix_quick_gate.sh: pass
  • Ruff check/format: pass
  • git diff --check: pass
  • CodeGraph: up to date

Closes #573
Closes #569
Related: #571
Unblocks: ContextualWisdomLab/codec-carver#250

스케줄러 신뢰 dispatch

  • OpenCode 재검토 스케줄러는 pull_request_target에서 생성된 skipped/old job을 rerun하지 않습니다.
  • current-head 재검토는 보호된 중앙 기본 브랜치의 repository_dispatch만 사용해, PR이 privileged workflow 실행 경로를 선택하지 못하도록 합니다.
  • tests/test_pr_review_merge_scheduler.py와 required-workflow 계약 테스트가 이 동작을 함께 고정합니다.

통합 재검증 (2026-07-17)

  • python3 -m pytest tests/test_required_workflow_queue_contract.py tests/test_pr_review_merge_scheduler.py -q: 151 passed
  • actionlint .github/workflows/strix.yml .github/workflows/pr-review-merge-scheduler.yml: pass
  • bash -n scripts/ci/test_strix_quick_gate.sh: pass
  • Ruff 및 git diff --check: pass

@seonghobae seonghobae moved this from Todo to In Progress in naruon Platform Roadmap Jul 16, 2026
@seonghobae seonghobae changed the title fix(strix): 교차 저장소 PR 스코프 토큰 전달 fix(strix): 교차 저장소 토큰과 실행 권한 정규화 Jul 16, 2026
@seonghobae

Copy link
Copy Markdown
Contributor Author

중앙 부트스트랩 검토 영수증

Current head 49c09e4c091a35637ba4c4e2cb1246ea0c004ad0의 전체 diff를 검토했습니다. 변경 범위는 (1) Strix 설치 산출물 chmod go-w 후 digest 고정, (2) 교차 저장소 Strix PR 조회의 target-app token 사용, (3) OpenCode 재검토의 trusted repository_dispatch 강제입니다.

  • 로컬 계약 테스트: 151 passed
  • actionlint / Bash syntax / Ruff / diff check: pass
  • CodeQL merge preview (actions, python): success
  • Semgrep, Bandit, dependency-review, OSV, Trivy, gitleaks: success
  • 미해결 review thread: 0
  • 현재 Strix 실패: 취약점 보고 없이 base workflow의 group/world-writable executable 검사에서 exit 127; 이 PR head는 base-bound privileged workflow라 해당 실패를 스스로 해소할 수 없음

따라서 실제 보안 finding을 우회하는 것이 아니라, 동일 fail-closed 검사를 유지하면서 중앙 required-workflow self-bootstrap 교착을 해소하는 변경으로 승인합니다. 병합 후 downstream current-head Strix를 새 중앙 main에서 다시 실행해 결과를 재검증합니다.

@seonghobae
seonghobae merged commit 8684f90 into main Jul 16, 2026
47 of 66 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in naruon Platform Roadmap Jul 16, 2026
@seonghobae
seonghobae deleted the fix/strix-cross-repo-dispatch-token branch July 16, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix(strix): use target token for cross-repo dispatch PR scoping fix(strix): normalize installed executable permissions

1 participant